<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!--使用for循环列出运费值-->
    <table border="0" cellpadding="3">
        <tr>
            <td bgcolor="#cccccc" align="center">Distance</td>
            <td bgcolor="#cccccc" align="center">Cost</td>
        </tr>
        <?php
            for($distance=50;$distance<=250;$distance+=50){
                echo "<tr>";
                    echo "<td align='right'>";
                    echo $distance;
                    echo "</td> \n";
                    echo "<td align='right'>";
                    echo $distance / 10;
                    echo "</td> \n";
                echo "</tr> \n";
            }

        ?>
    </table>
    <hr>
    <?php
        //使用for循环与变量创建表单域
        $numnames = 50;
        for($i = 1 ; $i <= $numnames ; $i++){
            $temp = "name$i";
            echo "<input type='text' name='{$temp}' value='{$temp}'>",'<br/>';
        }
    ?>


</body>
</html>